// 生产线相关API

import request from '@/plugins/request.js'

export function getLines(){
    return request({
        url: '/lines',
        method: 'GET'
    })
}

export function addLine(data){
    return request({
        url: '/lines',
        method: 'POST',
        data
    })
}

export function getLine(id){
    return request({
        url: '/lines/'+id,
        method: "GET"
    })
}

export function editLine(data){
    return request({
        url: '/lines',
        method: 'PUT',
        data
    })
}

export function delLine(id){
    return request({
        url: '/lines/'+id,
        method: "DELETE"
    })
}

export function getHierarchyAll(){
    return request({
        url: '/lines/hierarchy-all',
        method: "GET"
    })
}